package net.bwie.realtime.jtp.dws.trade.function;

import net.bwie.realtime.jtp.dws.trade.bean.LiveRoomEventBean;
import org.apache.flink.api.common.functions.FilterFunction;
import org.apache.flink.streaming.api.datastream.DataStream;

public class FilterInvalidEvent implements FilterFunction<LiveRoomEventBean> {

    @Override
    public boolean filter(LiveRoomEventBean event) {
        if (event.getTs() == null || event.getEventType() == null) {
            System.out.println("脏数据丢弃: " + event);
            return false;
        }
        return true;
    }
}
